import request from '@/utils/request'

// 线路（分页）
export function getListPage(query) {
  return request({
    url: '/basic/line/',
    method: 'GET',
    params: query
  })
}

export function updateData(query) {
  return request({
    url: '/basic/line/',
    method: 'POST',
    data: query
  })
}

export function deleteData(query) {
  return request({
    url: `/basic/line/${query}`,
    method: 'DELETE'
  })
}

//  线路（不分页）  树状结构
export function lineList(query) {
  return request({
    url: `/basic/line/lineTree`,
    method: 'GET'
  })
}

// 线路检测周期
export function getLineCycleList(query) {
  return request({
    url: `/basic/jcwDetectLineCycle/list/${query}`,
    method: 'GET'
  })
}

export function updateLineCycle(query) {
  return request({
    url: `/basic/jcwDetectLineCycle/`,
    method: 'POST',
    data: query
  })
}

export function deleteLineCycle(query) {
  return request({
    url: `/basic/jcwDetectLineCycle/${query}`,
    method: 'DELETE'
  })
}
